﻿
using BCCommon;
using BCDto.Common.SystemExceptionRecord;
using System;

namespace BCService.Common.ExceptionService
{
    /// <summary>
    /// 系统异常
    /// </summary>
    public interface ISystemExceptionRecordService
    {
        /// <summary>
        /// 创建系统异常信息
        /// </summary>
        /// <param name="dto">系统异常信息记录</param>
        void Create(SystemExceptionRecordDto dto);
        /// <summary>
        /// 创建系统异常信息(不发邮件)
        /// </summary>
        /// <param name="dto">系统异常信息记录</param>
        void CreateNoneEmail(SystemExceptionRecordDto dto);
        /// <summary>
        /// 插入异常信息
        /// </summary>
        /// <param name="ex">异常信息</param>
        /// <param name="requestData">请求数据</param>
        void InsertException(Exception ex, string requestData);
        /// <summary>
        /// 插入异常信息(不发邮件)
        /// </summary>
        /// <param name="ex">异常信息</param>
        /// <param name="requestData">请求数据</param>
        void InsertExceptionNoneEmail(Exception ex, string requestData);
        /// <summary>
        /// 分页查询系统异常信息列表
        /// </summary>
        /// <param name="name">异常名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<SystemExceptionRecordDto> GetSystemExceptionRecords(string name, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        ///// <summary>
        ///// 添加App异常信息
        ///// </summary>
        ///// <param name="appExceptionRecordRequestDto">App异常信息</param>
        //void Create(AppExceptionRecordRequestDto appExceptionRecordRequestDto);
        ///// <summary>
        ///// 分页查询App异常信息列表
        ///// </summary>
        ///// <param name="appExceptionHandleStatus">App异常处理状态</param>
        ///// <param name="pageIndex">分页页码</param>
        ///// <param name="pageSize">分页页数</param>
        ///// <returns></returns>
        //PageableList<AppExceptionRecordDto> GetAppExceptionRecords(AppExceptionHandleStatus appExceptionHandleStatus, int pageIndex, int pageSize);
    }
}
